In cryptography, a message authentication code (MAC) is often used to provide integrity and authenticity assurances on a transmitted message. In many systems, the MAC is often produced by using a “hash function” that accepts as input a secret key and an arbitrary-length message to be authenticated, and outputs the MAC (also known as a tag). The MAC value protects both data integrity of the message as well as its authenticity, by allowing verifiers to detect any changes to the message content.